<?php

class Core_Model_Design_Block_Template extends Dcmp_Model_Entity {

    public function __construct() {
        parent::__construct();
    }

    public function getModule(){
        if(!$this->hasData('module')){
            $this->data['module'] = App::getModel('global/module')->load($this->getModuleId());
        }
        return $this->data['module'];
    }

    protected function initializeTable($table) {
        $table->setName('{t}design_block_template');
        $table->createColumn('id', 'guid', TRUE);
        $table->createColumn('name', 'string');
        $table->createColumn('file_name', 'string');
        $table->createColumn('module_id', 'string');
        $table->createColumn('area_id', 'string');
        $table->createColumn('enabled', 'integer');
        $table->createColumn('website_theme', 'string');
    }

}